package org.springblade.modules.platform.dto;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
public class RuleLinkageSendDTO {

    private Integer id;
    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    private String ruleLinkageName;

    /**
     * 定时时间格式
     */
    @ApiModelProperty(value = "定时时间格式")
    private String cronExpression;

    /**
     * 设备ID
     */
    @ApiModelProperty(value = "设备ID")
    private String deviceId;
    @ApiModelProperty(value = "数量")
    private Integer count;
    /**
     * 设备名称
     */
    @ApiModelProperty(value = "设备名称")
    private String deviceName;


    /**
     * 1:开启；2：关闭
     */
    @ApiModelProperty(value = "1:开启；2：关闭")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer state;

    /**
     * 添加时间
     */
    @ApiModelProperty(value = "添加时间")
    private Long insertTime;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private Long updateTime;


    /**
     * 是否已下发
     */
    @ApiModelProperty(value = "1:已下发；2：未下发")
    private Integer isIssue;


    @ApiModelProperty(value = "测量链集合")
    private List<RuleLinkageMeasuringDTO> ruleLinkageMeasuringDTOS;

    @NoArgsConstructor
    @Data
    public static class RuleLinkageMeasuringDTO {

        /**
         * 设备ID
         */
        @ApiModelProperty(value = "测量链编号")
        private String measuringId;





        /**
         * 设备名称
         */
        @ApiModelProperty(value = "测量链名称")
        private String measuringName;;
    }
}
